Method and Apparatus for Building Motion Vector List for Motion Vector Prediction

ABSTRACT

Relating to the field of video coding, a method and an apparatus for building a motion vector list for motion vector prediction, which solve a problem of building motion vector lists of at least two PUs in a same coding unit in a serial manner, and improve the parallel processing capability. The method includes: obtaining spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit; determining available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtaining motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and adding the obtained motion vector predictors to the motion vector list.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of International Application No. PCT/CN2013/073817, filed on Apr. 7, 2013, which claims priority to Chinese Patent Application No. 201210377579.4, filed on Oct. 8, 2012, both of which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of video coding, and in particular, to a method and an apparatus for building a motion vector list for motion vector prediction.

BACKGROUND

An interframe prediction technology in the High Efficiency Video Coding (HEVC) adopts a conventional Motion Compensated Prediction (MCP) method. For motion vector prediction, the HEVC adopts a multiple motion vectors competition method, which improves the accuracy of motion vector prediction, thereby improving the coding compression performance.

The HEVC interframe prediction mode may include, but is not limited to, a Merge mode, a Skip mode, and so on, all of which use the multiple motion vectors competition to perform interframe prediction. A motion vector list is used when motion vector prediction is performed. For the Merge mode and the Skip mode, the motion vector list is allowed to contain at most four spatial motion vector predictors and one temporal motion vector predictor, where the Merge mode and the Skip mode share one motion vector list. A coder selects a best motion vector predictor from the motion vector list as a motion vector predictor of a current Prediction Unit (PU), which may be called a prediction block hereinafter.

A method for building the motion vector list may include:

As shown in FIG. 1, spatial neighboring blocks of the current PU may include: a neighboring block A0 (a bottom-left reference block corresponding to a bottom-left corner position of the current PU), a neighboring block A1 (a left reference block corresponding to the bottom-left corner position of the current PU), a neighboring block B0 (a top-right reference block corresponding to a top-right corner position of the current PU), a neighboring block B1 (a top reference block corresponding to the top-right corner position of the current PU), and a neighboring block B2 (a top-left reference block corresponding to a top-left position of the current PU). A Temporal Motion Vector predictor (TMVP) is a motion vector predictor corresponding to the current PU in time domain.

Firstly, motion vector predictors are successively obtained from the neighboring blocks and the TMVP in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, the neighboring block B2, and the TMVP. Then, the obtained motion vector predictors are added to the motion vector list according to a rule in the HEVC. The specific motion vector list building process is a technology well known by a person skilled in the art, so that details will not be described herein again.

Further, a current Coding Unit (CU), which may be called a coding unit hereinafter, may include at least two PUs, and motion vector lists of the at least two PUs are built in a serial manner.

During the implementation of the above motion vector list building process, it is found that the prior art has at least the following problem: if the current CU includes at least two PUs, and the motion vector lists of the at least two PUs are built in a serial manner, the speed of building the motion vector lists of the at least two PUs in the same CU is slow, thereby reducing the parallel processing capability.

SUMMARY

Embodiments of the present invention provide a method and an apparatus for building a motion vector list for motion vector prediction, which solve the problem of building motion vector lists of at least two PUs in a same coding unit in a serial manner, and improve the parallel processing capability.

In order to achieve the above objective, the following technical solutions are adopted in the embodiments of the present invention.

In one aspect, a method for building a motion vector list for motion vector prediction is provided, which includes: obtaining spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit; determining available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtaining motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and adding the obtained motion vector predictors to the motion vector list.

In another aspect, an apparatus for building a motion vector list for motion vector prediction is provided, which includes: a receiver configured to obtain spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit; and a processor configured to determine available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtain motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and add the obtained motion vector predictors to the motion vector list.

In the method and apparatus for building a motion vector list for motion vector prediction provided in the embodiments of the present invention, through the above solutions, when a motion vector list of a prediction block is built, spatial neighboring blocks of the current prediction block are obtained firstly, where the current prediction block is located inside a current coding unit; available neighboring blocks of the current prediction block are determined according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and motion vector predictors are obtained from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and the obtained motion vector predictors are added to the motion vector list. In this way, when the motion vector list of the prediction block is built, no neighboring block located inside the current coding unit is considered. When the coding unit includes at least two prediction blocks, motion vector lists of the at least two prediction blocks may be built in a parallel manner, which increases the speed of building the motion vector lists of the at least two prediction blocks in the same coding unit, and improves the parallel processing capability.

BRIEF DESCRIPTION OF DRAWINGS

To illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. The accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

FIG. 1 is a schematic structural diagram of a coding unit CU, a PU, and neighboring blocks according to an embodiment;

FIG. 2A to FIG. 2G are schematic structural diagrams of a coding unit CU with different partition manners according to an embodiment;

FIG. 3 is a flowchart of a method for building a motion vector list for motion vector prediction according to an embodiment; and

FIG. 4 is a schematic structural diagram of an apparatus for building a motion vector list for motion vector prediction according to an embodiment.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. The described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

In the prior art, a CU may include at least two PUs, and motion vector lists of the at least two PUs are built in a serial manner. That is, after the motion vector list is built for a current PU, a motion vector list starts to be built for the next PU.

The specific process may include:

As shown in FIG. 2A to FIG. 2G, a CU (solid line frame in figures) may be further partitioned into multiple PUs. In the HEVC, the CU may have seven partition manners. For example, in the partition manners shown in FIG. 2A to FIG. 2C, a current CU is partitioned into two PUs (PU1 and PU2) on left and right sides. For another example, in the partition manner shown in FIG. 2D, the current CU is partitioned into four PUs (PU1, PU2, PU3, and PU4), and other types are not described herein.

Taking the partition shown in FIG. 2A as an example, since a spatial reference block A1 of the PU2 is located inside the PU1, a motion vector list of the PU2 can start to be built only after PU1 coding is finished, where the motion vector lists of the PU1 and the PU2 are built in a serial manner. Specifically, the motion vector list of the PU1 is firstly built according to the above method, and then the motion vector list of the PU2 is built according to the above method.

In this way, the speed of building the motion vector lists of at least two PUs is slow, and the compression coding performance is degraded.

In order to solve the above problem that the speed of building the motion vector lists of at least two PUs is slow and the compression coding performance is degraded, a method for building a motion vector list for motion vector prediction is provided in an embodiment. As shown in FIG. 3, the method may include:

301: Obtain spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit.

302: Determine available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit.

303: Obtain motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and add the obtained motion vector predictors to the motion vector list.

Through the above solution, when building a motion vector list of a prediction block, spatial neighboring blocks of the current prediction block are obtained firstly, where the current prediction block is located inside a current coding unit; available neighboring blocks of the current prediction block are determined according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and motion vector predictors are obtained from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and the obtained motion vector predictors are added to the motion vector list. In this way, when the motion vector list of the prediction block is built, no neighboring block located inside the current coding unit is considered. When the coding unit includes at least two prediction blocks, motion vector lists of the at least two prediction blocks may be built in a parallel manner, which increases the speed of building the motion vector lists of the at least two prediction blocks in the same coding unit, and improves the parallel processing capability.

Another method for building a motion vector list for motion vector prediction is provided in an embodiment, and the method is further an extension of the method shown in FIG. 3. As shown in FIG. 3, the method may include:

301: Obtain spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit.

As shown in FIG. 1, the spatial neighboring blocks of the prediction block may include: a neighboring block A0 located at a bottom-left side of the prediction block, a neighboring block A1 located at a left side of the prediction block, a neighboring block B0 at a top-right side of the prediction block, a neighboring block B1 at a top side of the prediction block, and a neighboring block B2 at a top-left side of the prediction block.

A method for obtaining the spatial neighboring blocks of the prediction block, the prediction block, and the neighboring blocks is not limited in this embodiment, and is a technology well known by a person skilled in the art, so that details will not be described herein again.

302: Determine available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit.

Further, as shown in FIG. 2E to FIG. 2G, if the current coding unit CU is partitioned into a first prediction block PU1 and a second prediction block PU2 on top and bottom sides, and the current prediction block is the second prediction block PU2, the available neighboring blocks of the PU2 include: the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 of the second prediction block. At this time, the neighboring block B1 is located inside the current coding unit CU, and does not act as the available neighboring block of the second prediction block PU2.

As shown in FIG. 2A to FIG. 2C, if the current coding unit CU is partitioned into a first prediction block PU1 and a second prediction block PU2 on left and right sides, and the current prediction block is the second prediction block PU2, the available neighboring blocks of the PU2 include: neighboring block A0, neighboring block B0, neighboring block B1, and neighboring block B2 of the second prediction block PU2. At this time, the neighboring block A1 is located inside the current coding unit CU, and does not act as the available neighboring block of the second prediction block PU2.

Further, the available neighboring blocks may be determined by using flag bits of the neighboring blocks. The flag bits may, but are not limited to, be used to identify that the neighboring blocks are not located inside the CU.

A method for determining the available neighboring blocks by using the flag bit(s) of the neighboring blocks is not limited in this embodiment, and is a technology well known by a person skilled in the art, so that details will not be described herein again.

303: Obtain motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and add the obtained motion vector predictors to the motion vector list.

Further, the obtaining motion vector predictors from the available neighboring blocks in a preset sequence may include, if the available neighboring blocks are interframe coding blocks, obtaining the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.

Specifically, if the available neighboring blocks are interframe coding blocks, it indicates that the neighboring blocks include motion vector information, and the motion vector predictors are obtained from the neighboring blocks.

Specifically, if the available neighboring blocks of the prediction block include the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 of the second prediction block, the motion vector predictors are obtained from the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 in a sequence of the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2. In view of the above, when the current CU is partitioned into the first and the second prediction blocks on top and bottom sides, the available neighboring blocks of the second prediction block do not include the neighboring block B1 located inside the first prediction block. Therefore, the motion vector predictor from B1 is not obtained.

If the available neighboring blocks of the prediction block include: the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2 of the second prediction block PU2, the motion vector predictors are obtained from the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2 in a sequence of the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2. In view of the above, when the current CU is partitioned into the first and the second prediction blocks on left and right sides, the available neighboring blocks of the second prediction block do not include the neighboring block A1 located inside the first prediction block. Therefore, the motion vector predictor from the A1 is not obtained.

Further, if the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, the adding the obtained motion vector predictors to the motion vector list includes determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors of other available neighboring blocks except the current available neighboring block; and if not, adding the motion vector predictor of the current available neighboring block to the motion vector list.

In view of the above, during the above process, since the available neighboring blocks do not include the neighboring block located inside the current CU, multiple PUs of the CU have no dependency, and may be executed in parallel. For example, when the current CU is partitioned into the first and the second prediction blocks on left and right sides, the available neighboring blocks of the second prediction block do not include the neighboring block A1 located inside the first prediction block, and the motion vector predictor of the A1 is not involved in the determination process. Therefore, the second prediction block and the first prediction block may execute the process in parallel.

Specifically, as an implementation manner of the embodiment, if the current available neighboring block is the neighboring block B1, it is determined whether a motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1; if the current available neighboring block is the neighboring block B0, it is determined whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1; if the current available neighboring block is the neighboring block A0, it is determined whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1; and if the current available neighboring block is the neighboring block B2, it is determined whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1.

Further, if the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, the adding the obtained motion vector predictors to the motion vector list may further include determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors that have been added to the motion vector list; and if not, adding the motion vector predictor of the current available neighboring block to the motion vector list.

Specifically, as an implementation manner of the embodiment, if the current available neighboring block is the neighboring block B1, it is determined whether the motion vector predictor of the neighboring block B1 is the same as the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list; if the current available neighboring block is the neighboring block B0, it is determined whether the motion vector predictor of the neighboring block B0 is the same as the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list; if the current available neighboring block is the neighboring block A0, it is determined whether the motion vector predictor of the neighboring block A0 is the same as the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list; and if the current available neighboring block is the neighboring block B2, it is determined whether the motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list.

Further, a TMVP may further be considered during the build-up of the motion vector list.

As an implementation manner of the embodiment, the obtaining motion vector predictors from the available neighboring blocks in a preset sequence may further be obtaining motion vector predictors from the available neighboring blocks and/or the TMVP in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, the neighboring block B2, and the TMVP.

In order to describe the solution of the present invention more clearly, the method for building the motion vector list for the CU with different partition manners are specifically described below.

1. The CU is Partitioned into a PU1 and a PU2 on Left and Right Sides

(1) Build a Motion Vector List of the PU1

1) Obtain motion vector predictors from the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2 in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2, and add them to the motion vector list.

a. When the current neighboring block is the neighboring block A1, and only when the neighboring block A1 includes a motion vector predictor, add the motion vector predictor of the neighboring block A1 to the motion vector list; b. when the current neighboring block is the neighboring block B1, and only when the neighboring block B1 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block B1 to the motion vector list; c. when the current neighboring block is the neighboring block B0, and only when the neighboring block B0 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block B0 to the motion vector list; d. when the current neighboring block is the neighboring block A0, and only when the neighboring block A0 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block A0 to the motion vector list; and e. when the current neighboring block is the neighboring block B2, and only when the neighboring block B2 includes a motion vector predictor, the predictor is different from both the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list, and the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list, and the motion vector predictor of at least one of the neighboring block A1, the neighboring block B1, the neighboring block B0, and the neighboring block A0 has not been added to the motion vector list, add the motion vector predictor of the neighboring block B2 to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically, the TMVP of the PU1 is obtained by using a temporal reference image of the PU1, and if the TMVP of the PU1 is available, the TMVP is added to the motion vector list.

(2) Build a Motion Vector List of the PU2

1) Obtain motion vector predictors from the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2 in a sequence of the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2, and add them to the motion vector list.

a. When the current neighboring block is the neighboring block B1, and only when the neighboring block B1 includes a motion vector predictor, add the motion vector predictor of the neighboring block B1 to the motion vector list; b. when the current neighboring block is the neighboring block B0, and only when the neighboring block B0 includes a motion vector predictor, and the prediction value is different from the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block B0 to the motion vector list; c. when the current neighboring block is the neighboring block A0, and only when the neighboring block A0 includes a motion vector predictor, add the motion vector predictor of the neighboring block A0 to the motion vector list; and d. when the current neighboring block is the neighboring block B2, and only when the neighboring block B2 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block B1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block B2 to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically, the TMVP of the PU1 is obtained by using a temporal reference image of the PU1, and if the TMVP of the PU1 is available, the TMVP is added to the motion vector list.

At this time, since when the motion vector list of the PU2 is built, the neighboring block A1 of the PU2 is not considered, the motion vector lists of the PU1 and the PU2 may be built in a parallel manner.

2. The CU is Partitioned into a PU1 and a PU2 on Top and Bottom Sides

(1) Build a Motion Vector List of the PU1

This is similar to the method of “(1) Build a motion vector list of the PU1” in “1. The CU is partitioned into a PU1 and a PU2 on left and right sides”, so the details will not be described herein again.

(2) Build a Motion Vector List of the PU2

1) Obtain motion vector predictors from the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2 in a sequence of the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2, and add them to the motion vector list.

a. When the current neighboring block is the neighboring block A1, and only when the neighboring block A1 includes a motion vector predictor, add the motion vector predictor of the neighboring block A1 to the motion vector list; b. when the current neighboring block is the neighboring block B0, and only when the neighboring block B0 includes a motion vector predictor, add the motion vector predictor of the neighboring block B0 to the motion vector list; c. when the current neighboring block is the neighboring block A0, and only when the neighboring block A0 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block A0 to the motion vector list; and d. when the current neighboring block is the neighboring block B2, and only when the neighboring block B2 includes a motion vector predictor, and the predictor is different from the motion vector predictor, of the neighboring block A1 that has been added to the motion vector list, add the motion vector predictor of the neighboring block B2 to the motion vector list.

2) Obtain the TMVP, and add it to the motion vector list. Specifically, the TMVP of the PU1 is obtained by using a temporal reference image of the PU1, and if the TMVP of the PU1 is available, the TMVP is added to the motion vector list.

At this time, since when the motion vector list of the PU2 is built, the neighboring block B1 of the PU2 is not considered, the motion vector lists of the PU1 and the PU2 may be built in a parallel manner.

Through the above solution, when a motion vector list of a prediction block is built, spatial neighboring blocks of the current prediction block are obtained firstly, where the current prediction block is located inside a current coding unit; available neighboring blocks of the current prediction block are determined according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and motion vector predictors are obtained from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and the obtained motion vector predictors are added to the motion vector list. In this way, when the motion vector list of the prediction block is built, no neighboring block located inside the current coding unit is considered. When the coding unit includes at least two prediction blocks, motion vector lists of the at least two prediction blocks may be built in a parallel manner, which increases the speed of building the motion vector lists of the at least two prediction blocks in the same coding unit, and improves the parallel processing capability.

Some apparatus embodiments are provided below, and the provided apparatus embodiments respectively correspond to the above method embodiments. Refer to the method embodiments for specific implementation manners of the apparatus and a receiver and a processor included in the apparatus.

An apparatus for building a motion vector list for motion vector prediction is provided in an embodiment. As shown in FIG. 4, the apparatus may include: a receiver 41 configured to obtain spatial neighboring blocks of a current prediction block, where the current prediction block is located inside a current coding unit; and a processor 42 configured to determine available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtain motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and add the obtained motion vector predictors to the motion vector list.

Further, the spatial neighboring blocks of the prediction block obtained by the receiver 41 include a neighboring block A0 located at a bottom-left side of the prediction block, a neighboring block A1 located at a left side of the prediction block, a neighboring block B0 at a top-right side of the prediction block, a neighboring block B1 at a top side of the prediction block, and a neighboring block B2 at a top-left side of the prediction block.

Further, the processor 42 is further configured to, if the current coding unit is partitioned into a first prediction block and a second prediction block on top and bottom sides, and the current prediction block is the second prediction block, the available neighboring blocks of the prediction block include the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 of the second prediction block; and if the current coding unit is partitioned into a first prediction block and a second prediction block on left and right sides, and the current prediction block is the second prediction block, the available neighboring blocks of the prediction block include the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2 of the second prediction block.

The processor 42 is further configured to, if the available neighboring blocks are interframe coding blocks, obtain the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.

The processor 42 is further configured to determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors of other available neighboring blocks except the current available neighboring block; and if not, add the motion vector predictor of the current available neighboring block to the motion vector list.

The processor 42 is further configured to determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors that have been added to the motion vector list; and if not, add the motion vector predictor of the current available neighboring block to the motion vector list.

The processor 42 is further configured to, if the current available neighboring block is the neighboring block B1, determine whether a motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1; if the current available neighboring block is the neighboring block B0, determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1; if the current available neighboring block is the neighboring block A0, determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1; and if the current available neighboring block is the neighboring block B2, determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1.

The processor 42 is further configured to, if the current available neighboring block is the neighboring block B1, determine whether a motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1 that has been added to the motion vector list; if the current available neighboring block is the neighboring block B0, determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 that has been added to the motion vector list; if the current available neighboring block is the neighboring block A0, determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list; and if the current available neighboring block is the neighboring block B2, determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor of the neighboring block B1 that has been added to the motion vector list.

Through the above solution, when a motion vector list of a prediction block is built, the receiver obtains spatial neighboring blocks of the current prediction block first, where the current prediction block is located inside a current coding unit; and the processor determines available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, where the available neighboring blocks are located outside the current coding unit; and obtains the motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks, and adds the obtained motion vector predictors to the motion vector list. In this way, when the motion vector list of the prediction block is built, no neighboring block located inside the current coding unit is considered. When the coding unit includes at least two prediction blocks, motion vector lists of the at least two prediction blocks may be built in a parallel manner, which increases the speed of building the motion vector lists of the at least two prediction blocks in the same coding unit, and improves the parallel processing capability.

Through the foregoing description of the embodiments, a person skilled in the art may clearly understand that the present invention may be implemented by software in addition to necessary universal hardware, and definitely may also be implemented by hardware. However, under most circumstances, the former is preferred. Based on such an understanding, the technical solutions of the present invention essentially, or the part contributing to the prior art may be implemented in the form of a software product. The computer software product is stored in a readable storage medium, for example, a floppy disc, a hard disk, or an optical disc of a computer, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform the methods described in the embodiments of the present invention.

The foregoing descriptions are merely specific embodiments of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the appended claims. 

What is claimed is:
 1. A method for building a motion vector list for motion vector prediction, comprising: obtaining spatial neighboring blocks of a current prediction block, wherein the current prediction block is located inside a current coding unit; determining available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, wherein the available neighboring blocks are located outside the current coding unit; and obtaining a plurality of motion vector predictors from the available neighboring blocks in a preset sequence according to the motion vector predictors of the available neighboring blocks, and adding the obtained motion vector predictors to the motion vector list.
 2. The method for building a motion vector list for motion vector prediction according to claim 1, wherein the spatial neighboring blocks of the prediction block comprise a neighboring block A0 located at a bottom-left side of the prediction block, a neighboring block A1 located at a left side of the prediction block, a neighboring block B0 at a top-right side of the prediction block, a neighboring block B1 at a top side of the prediction block, and a neighboring block B2 at a top-left side of the prediction block.
 3. The method for building a motion vector list for motion vector prediction according to claim 2, either wherein the current coding unit is partitioned into a first prediction block and a second prediction block on top and bottom sides, wherein the current prediction block is the second prediction block, and wherein the available neighboring blocks of the prediction block comprise the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 of the second prediction block, or wherein the current coding unit is partitioned into a first prediction block and a second prediction block on left and right sides, wherein the current prediction block is the second prediction block, and wherein the available neighboring blocks of the prediction block comprise the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2 of the second prediction block.
 4. The method for building a motion vector list for motion vector prediction according to claim 2, wherein the available neighboring blocks are interframe coding blocks, and wherein obtaining the motion vector predictors from the available neighboring blocks in the preset sequence comprises obtaining the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.
 5. The method for building a motion vector list for motion vector prediction according to claim 3, wherein the available neighboring blocks are interframe coding blocks, and wherein obtaining the motion vector predictors from the available neighboring blocks in the preset sequence comprises obtaining the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.
 6. The method for building a motion vector list for motion vector prediction according to claim 4, wherein the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, and wherein adding the obtained motion vector predictors to the motion vector list comprises: determining whether the motion vector predictor of the current available neighboring block is the same as the motion vector predictors of other available neighboring blocks that are not the current available neighboring block; and adding the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block.
 7. The method for building a motion vector list for motion vector prediction according to claim 5, wherein the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, and wherein adding the obtained motion vector predictors to the motion vector list comprises: determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block; and adding the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block.
 8. The method for building a motion vector list for motion vector prediction according to claim 4, wherein the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, and wherein the adding the obtained motion vector predictors to the motion vector list comprises: determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors that have been added to the motion vector list; and adding the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors that have been added to the motion vector list.
 9. The method for building a motion vector list for motion vector prediction according to claim 5, wherein the obtained motion vector predictor is a motion vector predictor of a current available neighboring block, and wherein the adding the obtained motion vector predictors to the motion vector list comprises: determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors that have been added to the motion vector list; and adding the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors that have been added to the motion vector list.
 10. The method for building a motion vector list for motion vector prediction according to claim 6, wherein determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block comprises: determining whether the motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block B1; determining whether the motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B0; determining whether the motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block A0; and determining whether the motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B2.
 11. The method for building a motion vector list for motion vector prediction according to claim 7, wherein determining whether the motion vector predictor of the current available neighboring block is the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block comprises: determining whether the motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block B1; determining whether the motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B0; determining whether the motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block A0; and determining whether the motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B2.
 12. The method for building a motion vector list for motion vector prediction according to claim 8, wherein determining whether the motion vector predictor of the current available neighboring block is the same as the motion vector predictors that have been added to the motion vector list comprises: determining whether the motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B1; determining whether the motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B0; determining whether the motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block A0; and determining whether the motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B2.
 13. The method for building a motion vector list for motion vector prediction according to claim 9, wherein determining whether the motion vector predictor of the current available neighboring block is the same as the motion vector predictors that have been added to the motion vector list comprises: determining whether the motion vector predictor of the neighboring block B1 is the same as a motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B1; determining whether the motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B0; determining whether the motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block A0; and determining whether the motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B2.
 14. An apparatus for building a motion vector list for motion vector prediction, comprising: a receiver configured to obtain spatial neighboring blocks of a current prediction block, wherein the current prediction block is located inside a current coding unit; and a processor configured to: determine available neighboring blocks of the current prediction block according to a partition manner of the current coding unit, wherein the available neighboring blocks are located outside the current coding unit; obtain motion vector predictors from the available neighboring blocks in a preset sequence according to motion vector predictors of the available neighboring blocks; and add the obtained motion vector predictors to the motion vector list.
 15. The apparatus for building a motion vector list for motion vector prediction according to claim 14, wherein the spatial neighboring blocks of the prediction block obtained by the receiver comprise a neighboring block A0 located at a bottom-left side of the prediction block, a neighboring block A1 located at a left side of the prediction block, a neighboring block B0 at a top-right side of the prediction block, a neighboring block B1 at a top side of the prediction block, and a neighboring block B2 at a top-left side of the prediction block.
 16. The apparatus for building a motion vector list for motion vector prediction according to claim 15, either wherein the current coding unit is partitioned into a first prediction block and a second prediction block on top and bottom sides, wherein the current prediction block is the second prediction block, and wherein the available neighboring blocks of the prediction block comprise the neighboring block A0, the neighboring block A1, the neighboring block B0, and the neighboring block B2 of the second prediction block; or wherein the current coding unit is partitioned into a first prediction block and a second prediction block on left and right sides, wherein the current prediction block is the second prediction block, and wherein the available neighboring blocks of the prediction block comprise the neighboring block A0, the neighboring block B0, the neighboring block B1, and the neighboring block B2 of the second prediction block.
 17. The apparatus for building a motion vector list for motion vector prediction according to claim 15, wherein the available neighboring blocks are interframe coding blocks, and wherein the processor is further configured to obtain the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.
 18. The apparatus for building a motion vector list for motion vector prediction according to claim 16, wherein the available neighboring blocks are interframe coding blocks, and wherein the processor is further configured to obtain the motion vector predictors from the available neighboring blocks in a sequence of the neighboring block A1, the neighboring block B1, the neighboring block B0, the neighboring block A0, and the neighboring block B2.
 19. The apparatus for building a motion vector list for motion vector prediction according to claim 17, wherein the processor is further configured to: determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block based on the determination that the obtained motion vector predictor is a motion vector predictor of a current available neighboring block; and add the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block.
 20. The apparatus for building a motion vector list for motion vector prediction according to claim 18, wherein the processor is further configured to: determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block based on the determination that the obtained motion vector predictor is a motion vector predictor of a current available neighboring block; and add the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of a current available neighboring block is not the same as motion vector predictors of other available neighboring blocks that are not the current available neighboring block.
 21. The apparatus for building a motion vector list for motion vector prediction according to claim 17, wherein the processor is further configured to: determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors that have been added to the motion vector list based on the determination that the obtained motion vector predictor is a motion vector predictor of a current available neighboring block; and add the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors that have been added to the motion vector list.
 22. The apparatus for building a motion vector list for motion vector prediction according to claim 18, wherein the processor is further configured to: determine whether a motion vector predictor of a current available neighboring block is the same as motion vector predictors that have been added to the motion vector list based on the determination that the obtained motion vector predictor is the motion vector predictor of a current available neighboring block; and add the motion vector predictor of the current available neighboring block to the motion vector list based on the determination that the motion vector predictor of the current available neighboring block is not the same as motion vector predictors that have been added to the motion vector list.
 23. The apparatus for building a motion vector list for motion vector prediction according to claim 19, wherein the current available neighboring block is the neighboring block B1, and wherein when the processor is configured to determine whether the motion vector predictor of the neighboring block B1 is the same as the motion vector predictor of the neighboring block A1, the processor is configured to: determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B0; determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block A0; and determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B2.
 24. The apparatus for building a motion vector list for motion vector prediction according to claim 20, wherein the current available neighboring block is the neighboring block B1, and wherein when the processor is configured to determine whether the motion vector predictor of the neighboring block B1 is the same as the motion vector predictor of the neighboring block A1, the processor is configured to: determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B0; determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 based on the determination that the current available neighboring block is the neighboring block A0; and determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 and the motion vector predictor of the neighboring block B1 based on the determination that the current available neighboring block is the neighboring block B2.
 25. The apparatus for building a motion vector list for motion vector prediction according to claim 21, wherein the current available neighboring block is the neighboring block B1, and wherein when the processor is configured to determine whether the motion vector predictor of the neighboring block B1 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list, the processor is configured to: determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B0; determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block A0; and determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B2.
 26. The apparatus for building a motion vector list for motion vector prediction according to claim 22, wherein the current available neighboring block is the neighboring block B1, and wherein when the processor is configured to determine whether the motion vector predictor of the neighboring block B1 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list, the processor is configured to: determine whether a motion vector predictor of the neighboring block B0 is the same as the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B0; determine whether a motion vector predictor of the neighboring block A0 is the same as the motion vector predictor of the neighboring block A1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block A0; and determine whether a motion vector predictor of the neighboring block B2 is the same as at least one of the motion vector predictor of the neighboring block A1 that has been added to the motion vector list and the motion vector predictor of the neighboring block B1 that has been added to the motion vector list based on the determination that the current available neighboring block is the neighboring block B2. 